<script setup>
import {ref} from 'vue'
let flag = ref(true)
let test = ()=>{
  flag.value = !flag.value
}
</script>

<template>
  <div>
    <h1 v-if="flag">真</h1>
    <h1 v-else>假</h1>
    <input type="button" value="点击" @click="test">
  </div>
  
</template>

<style scoped>

</style>
